package com.wayin.lift;

import com.wayin.lift.config.SpringUtils;
import com.wayin.lift.controller.android.AndroidController;
import com.wayin.lift.socket.Server_Andriod;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@SpringBootApplication
@EnableWebMvc
public class LiftApplication extends SpringBootServletInitializer {

    // 继承SpringBootServletInitializer然后重写configure方法即可
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(LiftApplication.class);
    }

    public static void main(String[] args) {
        SpringApplication.run(LiftApplication.class, args);
        Thread server = new Thread(new Server_Andriod());
        server.start();
    }

}
